package edu.sctu.practice.class01.xiangkun.assign03.demotwo;

/**
 * Created by xiangkun on 2015/11/5.
 */
class ComparableCircle extends Circle implements Comparable {

    public ComparableCircle(double r) {
        super(r);
    }

    public int compareTo(Object o) {
        if (getRadius() > ((Circle) o).getRadius()) return 1;
        else if (getRadius() < ((Circle) o).getRadius()) return -1;
        else return 0;
    }

}
